#!/usr/bin/python3

import requests


def get_access_token(appkey, appsecret):
    url = "https://oapi.dingtalk.com/gettoken?appkey=" + appkey + "&appsecret=" + appsecret
    rep = requests.get(url)
    result_json = rep.json()
    return result_json['access_token']


appKey = input("请输入钉钉AppKey:")
appSecret = input("请输入钉钉AppSecret:")
accessToken = get_access_token(appKey, appSecret)
print(accessToken)

